/*
 * Copyright (c) 2006 - 2022, webrx.cn All rights reserved.
 *
 */
package cn;

/**
 * <p>Project: app2022 - RegExp7
 * <p>Powered by webrx On 2022-01-13 17:55:33
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class RegExp7 {
    public static void main(String[] args) {
        String s = "myjava-java8jav";
        int n = s.split("java").length>0 ? s.split("java").length-1:0;
        if(s.endsWith("java")){
            n+=1;
        }
        System.out.println(n);
    }
}
